package com.ghbank.rdws.common.db.ds;

import javax.sql.DataSource;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.ghbank.rdws.common.db.utils.DataSourceManager;

//@Configuration
public class RefreshableDataSourceConfiguration {
    @Bean
    public DynamicDataSource dataSource(DataSourceManager dataSourceManager) {
        DataSource actualDataSource = dataSourceManager.createDataSource();
        return new DynamicDataSource(actualDataSource);
    }
}
